Skip to content

Conversation

@Ivorforce
Copy link
Member

@Ivorforce Ivorforce commented Nov 6, 2025

This rewrites the URL fetch to use the current branch of the docs for redirects (e.g. /en/4.5) instead of latest for everything.

This will be needed in the future when redirects diverge. For now, we only use the js redirects on 4.5 and master, which haven't diverged much yet.

Warning

I can't fully test this locally, because serving with python doesn't seem to incorporate the 404 page correctly.
However, testing with the REPL in the browser, this should work correctly (even for local testing, if someone gets it to work fully).

Bugsquad edit: Followup to #11304

@Ivorforce Ivorforce requested a review from Calinou November 6, 2025 22:22
@Ivorforce Ivorforce added enhancement content:redirect Issues and PRs involving moving content and adding a redirect rule on the backend cherrypick:4.5 labels Nov 6, 2025
@Calinou
Copy link
Member

Calinou commented Nov 6, 2025

I can't fully test this locally, because serving with python doesn't seem to incorporate the 404 page correctly.

I use https://github.com/TheWaWaR/simple-http-server with the following options while in _build/html:

--try-file 404.html

Python's SimpleHTTPServer also supports serving a custom 404 page, but it's more involved as you can't just use a CLI argument to enable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherrypick:4.5 content:redirect Issues and PRs involving moving content and adding a redirect rule on the backend enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants